package com.dxx.cloud.admin.module.request;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Schema(description = "添加产品库存变更请求体")
@Data
public class GoodsInventoryChangeAddRequest {

    @Schema(description="商户id",example="1")
    @NotNull
    private Long merId;

    @Schema(description="门店id",example="1")
    @NotNull
    private Long shopId;

    @Schema(description="原记录id",example="1")
    private Integer originId;

    @Schema(description="用户id",example="1")
    @NotNull
    private Integer userId;

    @Schema(description="订单编号")
    @JsonIgnore
    private String serialNo;

    @Schema(description="商品规格列表")
    @NotEmpty
    @Valid
    List<GoodsInventoryChangeAddModule> goodsList;

    @Schema(description="1入库 2门店调入",example="1")
    private Integer addType;

    @Schema(description="支付类型:1现金 2欠账 3银行卡 4其他 5存款 11门店微信二维码 12微信客户主扫 13微信客户被扫 14微信刷脸 21门店支付宝二维码 22支付宝客户扫商户 23支付宝商户扫客户 31易收宝客户扫商户 32易收宝商户扫客户",example="1")
    private Integer payType;

    @Schema(description="支付金额")
    @JsonIgnore
    private BigDecimal payAccount;

    @Schema(description="供应商id",example="1")
    private Integer supplyId;

    @Schema(description="供应商名称",example="1")
    private String supplyName;

    @Schema(description="损耗类型:1扔 2礼 3入冷库 4门店调出",example="1")
    private Integer lossType;

    @Schema(description="四舍五入类型 1四舍五入")
    private Integer roundType;

    @Schema(description="库存损耗到的对象信息",example = "库存损耗到的对象信息")
    private String lossToInfo;


    @Schema(description="门店调拨去的门店id",example = "1")
    private Integer lossToShopId;

    @Schema(description="经办人")
    private String agent;

    @Schema(description="创建日期")
    @JsonIgnore
    private Date createdDate;

    @Schema(description="创建者",example="admin")
    private String creator;

    @Schema(description="创建日期",example="admin")
    @JsonIgnore
    private Date created;

    @Schema(description="操作者",example="admin")
    private String operator;

    @Schema(description="操作者",example="admin")
    private List<GoodsInventoryChangeImgModule> imgList;

}